package com.ruoyi.canteen.mapper;

import com.ruoyi.canteen.domain.dto.UserDto;
import com.ruoyi.canteen.domain.dto.UserPostDto;
import com.ruoyi.canteen.domain.vo.MealDetailVO;
import com.ruoyi.canteen.domain.vo.MealStatisticsVO;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 杨祥
 * @date: 2025/04/30/14:31
 * @description:
 */
@Mapper
public interface MainMapper {
    /**
     * 根据配置key获取配置value
     * @param configKey 配置键
     * @return 配置值
     */
    String getValueByKey(@Param("configKey") String configKey);

    int checkCount(Long userId);

    List<UserPostDto> getUserPostList();

    int insertUserByAutoCreate(@Param("dto") UserDto dto);

    void inserUserpost(@Param("id") Long id, @Param("postId") Long postId);

    List<MealStatisticsVO> getMealStatistics(@Param("orderDate") Integer orderDate);

    List<MealDetailVO> getMealDetails(@Param("orderDate") Integer orderDate, @Param("mealType") String mealType, @Param("status") String status);
}
